import 'package:fish_redux/fish_redux.dart';
import '../../OrderView/model/order_view_model.dart';
import '../../../app_files.dart';

class PatrolOrderResultViewState
    implements Cloneable<PatrolOrderResultViewState> {
  List<OrderConfigModel> items;
  PatrolOrderItemModel pointInfo;

  String workerName;
  List orderPhoto = [];
  var orderSignPhoto;

  int orderStatus;

  bool isDetail = false;
  bool isNormal = true;

  TextEditingController selfFixContentController = TextEditingController();
  List repairPhotos = [];

  @override
  PatrolOrderResultViewState clone() {
    return PatrolOrderResultViewState()
      ..items = items
      ..pointInfo = pointInfo
      ..orderPhoto = orderPhoto
      ..orderSignPhoto = orderSignPhoto
      ..isDetail = isDetail
      ..workerName = workerName
      ..orderStatus = orderStatus
      ..repairPhotos = repairPhotos
      ..selfFixContentController = selfFixContentController
      ..isNormal = isNormal;
  }
}

PatrolOrderResultViewState initState(Map<String, dynamic> args) {
  return PatrolOrderResultViewState()
    ..pointInfo = args['info']
    ..items = args['items']
    ..isDetail = args['items'] == null;
}
